The present disclosure relates to the automatic generation of code. In some conventional approaches, automatic code generation, such as program synthesis, can be completed using techniques that involve specifications and formal methods for producing code, including proof-to-code transformations. These conventional approaches typically do not scale very well and can require expert knowledge on the part of the user, often requiring a deep knowledge of formal languages for expressing specifications. Therefore, the conventional approaches are not widely adopted in developing software.